home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 3
/
003.d81
/
checkbook bal
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
8KB
|
309 lines
10 rem checkbook balancer
20 rem by donna k. woody
30 :
40 poke53272,23: rem selects upper/lower case
50 printchr$(8):rem disables c/shift keys
60 poke53280,13:rem set border color to light green
70 poke53281,1:rem set backgroudn color to white
80 printchr$(30):rem set character color to green
90 :
100 rem initial setup
110 :
120 gosub2650
130 :
140 rem title page & instructions
150 :
160 gosub2750
170 :
180 rem get balances
190 :
200 gosub560
210 :
220 rem get outstanding deposits
230 :
240 gosub800
250 :
260 rem get outstanding checks
270 :
280 gosub1080
290 :
300 rem get misc charges
310 :
320 gosub1340
330 :
340 rem print out yes or no
350 :
360 gosub1630
370 :
380 rem print results
390 :
400 gosub1780:rem print to screen
410 :
420 rem end or another
430 :
440 printchr$(147)
450 printname$
460 print"[194]alance another checkbook (y/n)?[160]";
470 poke204,0:poke207,0:getz$:ifz$=""then470
480 poke204,1:print
490 ifz$="y"then 200
500 ifz$="n"then 520
510 print"[208]lease enter 'y' or 'n'.[145][145][145][145][145][145][145]":goto460
520 poke19,0:goto63000
530 :
540 rem get balances
550 :
560 printchr$(147)
570 printname$
580 input"[197]nter date ([205][205]/[196][196]/[217][217]): [157][157][157][157][157][157][157][157][157][157][157]";date$
590 iflen(date$)=8then620
600 print"[201]ncorrect date format. [208]lease re-enter.";
610 printchr$(19)"":goto580
620 print"";:printbt$:printchr$(19)""
630 print"[194]alance from bank statement (00.00):"
640 poke19,32:input "$ [157][157][157][157][157][157][157][157][157][157][157][157]";z$
650 bb=val(z$):z$="":print
660 print"[194]alance from checkbook (00.00):"
670 input"$ [157][157][157][157][157][157][157][157][157][157][157][157]";z$
680 cb=val(z$):z$="":print
690 print:print"[201]s this correct (y/n)?[160]";
700 poke204,0:poke207,0:getz$:ifz$=""then700
710 poke204,1:print
720 ifz$="y"then750
730 ifz$="n"thenprint"";bt$:printchr$(19)"":goto580
740 print"[208]lease answer 'y' or 'n'.[145][145][145][145][145][145][145][145][145][145]";:goto690
750 printchr$(19)""
760 return
770 :
780 rem get outstanding deposits
790 :
800 printchr$(147)
810 printtab(2);name$
820 print"[197]nter outstanding deposits (zero to end)"
830 printtab(7)"[196][207][160][206][207][212][160][197][206][212][197][210][160][195][207][205][205][193][211]!!!!"
840 forx=1tom1
850 poke19,32:input"[196]eposit date ([205][205]/[196][196]/[217][217]) : [160] [157][157][157][157][157][157][157][157][157]";d$(x):print
860 ifd$(x)="0"thencd=x-1:x=m1:goto 1030
870 iflen(d$(x))=8then900
880 print"[201]ncorrect date format. [208]lease re-enter." ;
890 printchr$(19)"":goto850
900 print"";bt$;:printchr$(19)""
910 input"[196]eposit amount (00.00): $ [157][157][157][157][157][157][157][157][157][157]";z$
920 d(x)=val(z$):z$="":print
930 ifd(x)=0thencd=x-1:x=m1:goto 1030
940 print"[201]s this correct (y/n)?[160]";
950 poke204,0:poke207,0:getz$:ifz$=""then950
960 poke204,1:print
970 ifz$="y"then1000
980 ifz$="n"thenprint"";bt$:printchr$(19)"":goto850
990 print"[208]lease answer 'y' or 'n'.[145][145][145][145][145][145][145][145][145]":goto940
1000 printchr$(19)""
1010 do=do+d(x)
1020 printchr$(19)""
1030 next
1040 return
1050 :
1060 rem get outstanding checks
1070 :
1080 printchr$(147)
1090 printtab(2);name$
1100 print" [197]nter outstanding checks (zero to end)"
1110 printtab(8)"[196][207][160][206][207][212][160][197][206][212][197][210][160][195][207][205][205][193][211]!!!"
1120 forx=1tom2
1130 poke19,32:print"[195]heck number:";tab(22);:input" [157][157][157][157][157]";z$
1140 ifval(z$)=0thencc=x-1:x=m2:goto1290
1150 c1$(x)=z$:z$="":print
1160 iflen(c1$(x))=4then1180
1170 c1$(x)=pad$+c1$(x):c1$(x)=right$(c1$(x),4):goto1180
1180 input"[195]heck amount (00.00): $ [157][157][157][157][157][157][157][157][157][157][157][157][157][157][157]";z$
1190 ifz$="0"thencc=x-1:x=m2:goto1290
1200 c(x)=val(z$):z$="":print
1210 print"[201]s this correct (y/n)? ";
1220 poke204,0:poke207,0:getz$:ifz$=""then1220
1230 poke204,1:print
1240 ifz$="y"then1270
1250 ifz$="n"thenprint"";bt$:printchr$(19)"":goto1130
1260 print"[208]lease answer 'y' or 'n'.[145][145][145][145][145][145][145][145][145]":goto1210
1270 printchr$(19)""
1280 co=co+c(x)
1290 next
1300 return
1310 :
1320 rem misc charges
1330 :
1340 printchr$(147)
1350 printtab(2);name$
1360 print"[197]nter miscellaneous charger (zero ends)"
1370 printtab(8)"[196][207][160][206][207][212] [213][211][197][160][195][207][205][205][193][211]!!!"
1380 forx=1to20
1390 print"[205]isc. charge name (15 characters):"
1400 poke19,32:input" [157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157]";m$(x)
1410 ifm$(x)="0"thencm=x-1: x=20:goto 1570
1420 iflen(m$(x))>15thenm$(x)=left$(m$(x),15):goto1450
1430 iflen(m$(x))<15thenm$(x)=m$(x)+pad$
1440 m$(x)=left$(m$(x),15)
1450 print
1460 print"[205]isc. charge amount (00.00):"
1470 input"$ [157][157][157][157][157][157][157][157][157][157][157][157][157][157][157]";z$
1480 m(x)=val(z$):z$="":print
1490 ifm(x)=0thencm=x-1:x=20:goto 1570
1500 print"[201]s this correct (y/n)?[160]";
1510 poke204,0:poke207,0:getz$:ifz$=""then1510
1520 poke204,1:print:ifz$="y"then1550
1530 ifz$="n"thenprint"";bt$:printchr$(19)"":goto1390
1540 print"[208]lease answer 'y' or 'n'.[145][145][145][145][145][145][145][145][145]":goto1500
1550 printchr$(19)""
1560 z$="":mc=mc+m(x)
1570 print"[145][145][145][145][145][145][145][145][145][145][145][145]"
1580 next
1590 return
1600 :
1610 rem print out - yes or no
1620 :
1630 printchr$(147)
1640 printtab(2);name$
1650 print"[196]o you want your balance sheet on:"
1660 print" <[211]>creen"
1670 print" <[208]>rinter"
1680 print"[197]nter your choice (s/p): ";
1690 poke204,0:poke207,0:getz$:ifz$=""then1690
1700 poke204,1:print
1710 ifz$="s"thenptr=0:goto1740
1720 ifz$="p"thenptr=1:goto1740
1730 print"[208]lease answer 's' or 'p'.[145][145][145][145][145][145][145][145][145][145]":z$="":goto1680
1740 return
1750 :
1760 :rem print to screen
1770 :
1780 :printchr$(147)
1790 printtab(2);name$
1800 printtab(16)"";date$
1810 print"[195]heckbook balance -------- $";:x=cb:h1=38:gosub2510:printx2$
1820 print"[207]utstanding [196]eposits ----- $";:x=do:h1=38:gosub2510:printx2$
1830 print"[207]utstanding checks ------- $";:x=co:h1=38:gosub2510:printx2$
1840 print"[205]iscellaneous charges ---- $";:x=mc:h1=38:gosub2510:printx2$
1850 printtab(27)"------------"
1860 tt=cb-do+co-mc
1870 print"[195]urrent balance ---------- $";:x=tt:h1=38:gosub2510:printx2$
1880 print"[194]ank statement balance --- $";:x=bb:h1=38:gosub2510:printx2$
1890 printtab(27)"------------"
1900 print"[196]ifference --------------- $";:df=tt-bb:x=df:h1=38:gosub2510:printx2$
1910 iftt=bbthenprint"[199]reat! [217]ou balance with the bank!":goto1940
1920 ifdf<>0thenprint"[211]orry, you don't balance with the bank."
1930 ifdf/9=int(df/9)thenprint:print"[217]ou may have transposed a figure."
1940 print"[196]o you want a printout (y/n)?[160]";
1950 poke204,0:poke207,0:getz$:ifz$=""then1950
1960 ifz$="y"thenptr=1:gosub2030:goto1990
1970 ifz$="n"then1990
1980 print"[208]lease answer 'y' or 'n'.[145][145][145][145][145][145][145][145][145][145][145][145][145]":goto1940
1990 return
2000 :
2010 rem print to printer
2020 :
2030 printchr$(147)
2040 print"[208]lease turn your printer on."
2050 print"[208]ress space bar when ready.";
2060 poke204,0:poke207,0:getz$:ifz$=""then2060
2070 open4,4,7:cmd4
2080 print:print
2090 printspc(2);name$
2100 print:printspc(20);date$:print:print
2110 print"[195]heckbook [194]alance ----------------- $";:x=bb:h1=9:gosub2510:printx2$
2120 print:print"[207]utstanding [196]eposits:"
2130 print:printspc(5)"[196]ate";spc(19)"[193]mount"
2140 forj=1tocd
2150 printspc(3)d$(j);spc(14)"$";:x=d(j):h1=9:gosub2510:printx2$
2160 next
2170 printspc(26)"----------"
2180 print:pri